//
//  GetDeviceTypeApi.m
//  DTSTON
//
//  Created by 喻贵华 on 16/5/5.
//  Copyright © 2016年 Demo. All rights reserved.
//

#import "GetDeviceTypeApi.h"

@implementation GetDeviceTypeApi
{
    NSDictionary *_parameter;
}
-(id)initWithPar:(NSDictionary *)parameter
{
    self=[super init];
    if(self)
    {
        _parameter=parameter;
        
    }
    return self;
}
-(YTKRequestMethod)requestMethod
{
    return YTKRequestMethodPOST;
}

-(NSString *)requestUrl
{
    return @"/device/get_type";
}
-(id)requestArgument
{
    
    NSMutableDictionary *mdic=[NSMutableDictionary getPubdic];
    NSString *sign= [NSString getSign:mdic];
    [mdic setObject:sign forKey:@"sign"];
    return mdic;
}
-(void)dealloc
{
   NSLog(@"%@ dealloc",NSStringFromClass([self class]));
}
-(NSArray *)analyResponSerializer
{
    NSDictionary *dic=[self responseJSONObject];
    NSMutableArray *arys=[NSMutableArray array];
    NSLog(@"getalldevice=====%@",dic);
    if([dic[@"errcode"] integerValue]==0)
    {
        NSArray *ary=  dic[@"data"];
        for (NSDictionary *objc in ary)
        {
            if (![objc[@"id"]isEqualToString:@"100"]) {
                [arys addObject:objc];
            }
       }
    }
        return arys;
}


@end
